import React, { useState } from 'react';

function DemoUseState(params) {
    let [ count, UseCount ] = useState(0);
    function del(params) {
        UseCount(--count)
    }
    return <div>
        useState
        <button onClick={()=>UseCount(++count)}>++</button>
        <span>{ count }</span>
        <button onClick={()=>{del()} }>--</button>
    </div>
}



export default DemoUseState;
